package com.wiscamp.ninechapters.problems.application.dto.commands.sheets;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.wiscamp.ninechapters.ddd.DataTransferObject;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;

@Data
public class CreateSheetDetailDto implements DataTransferObject {
    /**
     * 题编号
     */
    private long problemId = 0;

    /**
     * 问题编号
     */
    private long questionId = 0;

    /**
     * 解题步骤图片地址
     */
    private String solutionUrl = "";

    /**
     * 做题开始时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime questionBeginTime;

    /**
     * 做题结束时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    private LocalDateTime questionEndTime;

    /**
     * 多答案文本列表
     */
    private Collection<CreateSheetAnswerDto> sheetAnswers = new ArrayList<>();
}
